package com.freesky.biz.rights.domain;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.freesky.common.annotation.Desensitized;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
@ContentRowHeight(22)
@ColumnWidth(25)
@HeadRowHeight(25)
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft= BorderStyleEnum.THIN,
        borderRight= BorderStyleEnum.THIN,
        borderTop= BorderStyleEnum.THIN,
        borderBottom= BorderStyleEnum.THIN)//表头样式
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER,
        verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft= BorderStyleEnum.THIN,
        borderRight= BorderStyleEnum.THIN,
        borderTop= BorderStyleEnum.THIN,
        borderBottom= BorderStyleEnum.THIN)
@TableName("tec_rights_mobile_recharge")
public class RightsMobileRechargeEntity implements java.io.Serializable{

    @ExcelProperty("记录ID")
    private String id;

    @ExcelIgnore
    private String busiId;

    @ExcelIgnore
    @TableField(exist = false)
    private String busiName;

    @ExcelProperty("手机号码")
    @Desensitized(type = Desensitized.DesensitizedType.PHONE)
    private String mobile;

    @ExcelIgnore
    private String openId;

    @ExcelProperty("充值账号")
    private String receiveAccount;

    @ExcelProperty("充值金额")
    private Integer amt;

    @ExcelIgnore
    private String prepayId;        //支付ID

    @ExcelIgnore
    private String transactionId;

    @ExcelProperty("支付状态")
    private String payStatus;   //支付状态

    @ExcelProperty("处理标志")
    private String processed;   //下发立减金标志，0，未处理，1已处理完成

    @ExcelProperty("处理时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date processedDate;

    @ExcelProperty("是否退款")
    private String refundFlag;  //退款标志，0，未处理，1已退款

    @ExcelProperty("充值渠道")
    private String channel;

    @ExcelProperty("充值次数")
    private Integer sendTimes;

    @ExcelProperty("凭证号")
    private String voucherNo;

    @ExcelIgnore
    private String lastReqId;

    @ExcelProperty("下单单号")
    private String rechargeId;

    @ExcelProperty("下单状态")
    private String respErrmsg;

    @ExcelIgnore
    private String respCode;

    @ExcelIgnore
    private String state;


    @ExcelIgnore
    private String delFlag;

    @ExcelProperty("下单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ExcelIgnore
    private String remark;

    /** 请求参数 */
    @ExcelIgnore
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Map<String, Object> params;

    public Map<String, Object> getParams()
    {
        if (params == null)
        {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params)
    {
        this.params = params;
    }
}
